<template>
  <div class="coupon" ref="homePage">
    <van-nav-bar @click-left="clickleft" style="background: #ececec;" title="我的卡卷" left-text="" left-arrow>
      <div slot="right" class="searcha">
      </div>
    </van-nav-bar>
    <van-tabs v-model="active" title-active-color="#46d0ca">
      <van-tab title="可使用">
        <div class="border">
          <div class="stamp stamp04">
            <div class="par">
              <p>XXXXXX折扣店</p><sub class="sign">￥</sub><span>50.00</span><sub>优惠券</sub>
              <p>订单满100.00元</p>
            </div>
            <div class="copy">副券<p>2015-08-13<br>2016-08-13</p><a href="#">立即使用</a></div>
            <i></i>
          </div>
        </div>

      </van-tab>
      <van-tab title="已失效"></van-tab>
    </van-tabs>

  </div>
</template>

<script>
  export default {

    data() {
      return {
        clintHeigth: '', //获取页面高度
        type: this.$route.query.type,
        active: 0,
      }
    },

    mounted() {
      this.clientHeight = `${document.documentElement.clientHeight}` //document.body.clientWidth;
      // console.log(this.clientHeight);
      // let dd = 100;
      this.$refs.homePage.style.minHeight = this.clientHeight + 'px';
    },
    methods: {
      clickleft() {
        this.$router.back(-1);
        console.log(1)
      },

    }
  }
</script>

<style lang="scss">
  .coupon {
    .van-nav-bar {
      .van-nav-bar__left {
        .van-icon {
          color: #46d0ca !important;
          font-size: 1.25rem;
        }
      }
    }

    .van-tabs {
      .van-tabs__wrap {
        .van-tabs__line {
          background-color: #46d0ca !important;

        }
      }
    }

    .border {
      display: flex;

      align-items: center;

      flex-direction: column;
    }

    .stamp * {
      padding: 0;
      margin: 0;
      list-style: none;
      font-family: "Microsoft YaHei", 'Source Code Pro', Menlo, Consolas, Monaco, monospace;
    }

    .stamp {
      width: 370px;
      height: 140px;
      padding: 0 10px;
      margin-top: 10px;

      position: relative;
      overflow: hidden;


    }

    .stamp:before {
      content: '';
      position: absolute;
      top: 0;
      bottom: 0;
      left: 10px;
      right: 10px;

      // z-index: -1;
    }

    .stamp:after {
      content: '';
      position: absolute;
      left: 10px;
      top: 10px;
      right: 10px;
      bottom: 10px;
      box-shadow: 0 0 20px 1px rgba(0, 0, 0, 0.5);
      z-index: -2;
    }

    .stamp i {
      position: absolute;
      left: 20%;
      top: 45px;
      height: 190px;
      width: 390px;
      background-color: rgba(255, 255, 255, .15);
      transform: rotate(-30deg);
    }

    .stamp .par {
      float: left;
      padding: 16px 15px;
      width: 190px;
      border-right: 2px dashed rgba(255, 255, 255, .3);
      text-align: left;
      position: absolute;
      z-index: 2;
    }

    .stamp .par p {
      color: #fff;
      font-size: 16px;
      line-height: 21px;
    }

    .stamp .par span {
      font-size: 30px;
      color: #fff;
      margin-right: 5px;
      line-height: 65px;
    }

    .stamp .par .sign {
      font-size: 34px;
    }

    .stamp .par sub {
      position: relative;
      top: -5px;
      color: rgba(255, 255, 255, .8);
    }

    .stamp .copy {
      display: inline-block;
      padding: 21px 14px;
      width: 100px;
      vertical-align: text-bottom;
      font-size: 30px;
      color: rgb(255, 255, 255);
      text-align: center;
      line-height: initial;
      position: absolute;
      z-index: 2;
      right: 20px;
    }

    .stamp .copy p {
      font-size: 16px;
      margin-top: 15px;
    }

    .stamp04 {
      width: 354px;
      background: #46d0ca;
      background: radial-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 4px, #46d0ca 4px);
      background-size: 12px 8px;
      background-position: -5px 10px;
    }

    .stamp04:before {
      // background: #46d0ca;
      background-color: #46d0ca;
      left: 5px;
      right: 5px;
    }

    .stamp04 .copy {
      padding: 10px 6px 10px 12px;
      font-size: 24px;
    }

    .stamp04 .copy p {
      font-size: 14px;
      margin-top: 5px;
      margin-bottom: 8px;
    }

    .stamp04 .copy a {
      background-color: #fff;
      color: #333;
      font-size: 14px;
      text-decoration: none;
      padding: 5px 10px;
      border-radius: 3px;
      display: block;
    }


  }
</style>
